package com.elitesland.org.vo;

import com.elitesland.system.annotation.SysCode;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

@Data
@Accessors(chain = true)
@ApiModel(value = "BU-部门、中心等", description = "BU-部门、中心等")
public class OrgBuVO implements Serializable {

    private static final long serialVersionUID = -2217798237443989189L;

    @ApiModelProperty("记录ID")
    @JsonSerialize(using = ToStringSerializer.class)
    Long id;

    @ApiModelProperty("公司ID")
    @JsonSerialize(using = ToStringSerializer.class)
    Long ouId;

    @ApiModelProperty("公司信息")
    OrgOuVO ou;

    @ApiModelProperty("BU编号")
    String code;

    @ApiModelProperty("BU名称")
    String name;

    @ApiModelProperty("BU简称")
    String abbr;

    @ApiModelProperty("BU类型[UDC]ORG:BU_TYPE")
    String type;

    @ApiModelProperty("BU类型[UDC]ORG:BU_TYPE")
    @SysCode(sys = "ORG", mod = "BU_TYPE")
    String typeName;

    @ApiModelProperty("BU类型2")
    String type2;

    @ApiModelProperty("BU类型3")
    String type3;

    @ApiModelProperty("BU类型4")
    String type4;

    @ApiModelProperty("BU类型5")
    String type5;

    @ApiModelProperty("BU类型6")
    String type6;

    @ApiModelProperty("BU类型7")
    String type7;

    @ApiModelProperty("是否虚拟单位，用于财务责任中心")
    Boolean isVirtual;

    @ApiModelProperty("BU状态 [UDC]COM:STATUS_BU")
    String status;

    @ApiModelProperty("BU状态2")
    String status2;

    @ApiModelProperty("BU状态3")
    String status3;

    @ApiModelProperty("上级ID")
    @JsonSerialize(using = ToStringSerializer.class)
    Long parentId;

    @ApiModelProperty("上级BU信息")
    OrgBuVO parentBu;

    @ApiModelProperty(value = "排序号码")
    Integer sortNo;

    @ApiModelProperty("关系路径")
    String path;

    @ApiModelProperty("地址号")
    @JsonSerialize(using = ToStringSerializer.class)
    Long addrNo;

    @ApiModelProperty("BU层级 [UDC]ORG:BU_LEVEL")
    String level;

    @ApiModelProperty("区域 [UDC]COM:REGION")
    String region;

    @ApiModelProperty("负责人员工ID")
    @JsonSerialize(using = ToStringSerializer.class)
    Long chargeEmpId;

    @ApiModelProperty("关联BU ID-事业部")
    @JsonSerialize(using = ToStringSerializer.class)
    Long refBuId;

    @ApiModelProperty("关联BU信息-事业部")
    OrgBuVO refBu;

    @ApiModelProperty("关联BU ID-利润中心")
    @JsonSerialize(using = ToStringSerializer.class)
    Long refBuId2;

    @ApiModelProperty("关联BU信息-利润中心")
    OrgBuVO refBu2;

    @ApiModelProperty("关联BU ID-成本中心")
    @JsonSerialize(using = ToStringSerializer.class)
    Long refBuId3;

    @ApiModelProperty("关联BU信息-成本中心")
    OrgBuVO refBu3;

    @ApiModelProperty("关联BU ID4")
    @JsonSerialize(using = ToStringSerializer.class)
    Long refBuId4;

    @ApiModelProperty("关联BU信息4")
    OrgBuVO refBu4;

    @ApiModelProperty("关联BU ID5")
    @JsonSerialize(using = ToStringSerializer.class)
    Long refBuId5;

    @ApiModelProperty("关联BU信息5")
    OrgBuVO refBu5;

    @ApiModelProperty("关联BU ID6")
    @JsonSerialize(using = ToStringSerializer.class)
    Long refBuId6;

    @ApiModelProperty("外部编码")
    String externalCode;

    @ApiModelProperty(value = "岗位权重系数")
    Double postFactor;

    @ApiModelProperty("ES1")
    String es1;

    @ApiModelProperty("ES2")
    String es2;

    @ApiModelProperty("ES3")
    String es3;

    @ApiModelProperty("ES4")
    String es4;

    @ApiModelProperty("ES5")
    String es5;

    @ApiModelProperty("ES6")
    String es6;

    @ApiModelProperty("ES7")
    String es7;

    @ApiModelProperty("ES8")
    String es8;

    @ApiModelProperty("ES9")
    String es9;

    @ApiModelProperty("ES10")
    String es10;

    @ApiModelProperty("下级BU列表")
    List<OrgBuVO> children;
}
